package com.qianclass.talklive.app.view.Graffiti;

import android.graphics.Canvas;
import android.graphics.Paint;


/**
 * 绘制移动光标图、位置
 */
public class CursorLocation {

    public float mX, mY; // 当前位置
    public Paint mPaint;
    private float  mPaintSize = 3;

    public CursorLocation(float x, float y) {
        mX = x;
        mY = y;
        mPaint = new Paint();
        mPaint.setAntiAlias(true);
        mPaint.setStrokeWidth(mPaintSize);
        mPaint.setStyle(Paint.Style.FILL);
        mPaint.setStrokeJoin(Paint.Join.ROUND);
    }

    public void updateLocation(int x, int y) {
        mX = x;
        mY = y;
    }

    public void drawItSelf(Canvas canvas) {

        mPaint.setStrokeWidth(mPaintSize);
        mPaint.setStyle(Paint.Style.FILL);
        mPaint.setColor(0xaaffffff);
        DrawUtil.drawCircle(canvas, mX, mY, 15, mPaint);

        mPaint.setStrokeWidth(mPaintSize);
        mPaint.setStyle(Paint.Style.FILL_AND_STROKE);
        mPaint.setColor(0xaaff6666);
        DrawUtil.drawCircle(canvas, mX, mY, 15, mPaint);

        mPaint.setStrokeWidth(mPaintSize);
        mPaint.setStyle(Paint.Style.FILL);
        mPaint.setColor(0xccff0033); //
        DrawUtil.drawCircle(canvas, mX, mY, 10, mPaint);


    }

}
